package mechanism;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

public class Overload {

	public static void main(String[] args) {
		new Overload().method("啊啊");
		new Overload().method(new ArrayList());
		new Overload().method(new HashMap());
	}
	
	public void method(Object arg) {
		System.out.println("method with Object arg invoked:" + arg.getClass());
	}
	
	public void method(List arg) {
		System.out.println("method with List arg invoked:" + arg.getClass());
	}
	
	public void method(String arg) {
		System.out.println("method with String arg invoked:" + arg.getClass());
	}
}
